﻿using System;
using Unity.Type.BinaryType;
using Xunit;

namespace Unity.Type.Tests
{
    public class MetadataEDeserializerTest
    {
        [Fact]
        public void MethodsTest()
        {
            MetadataE testMetadata = MetadataESerializerTest.PrepareMetadataObject();
            byte[] serialMetadata = MetadataESerializerTest.PrepareMetadataSerializedData(testMetadata);
            Assert.True(serialMetadata.Length > 0);
            
            MetadataEDeserializer testMedataDeserializer = new MetadataEDeserializer();
            MetadataE deserializedMetadata = testMedataDeserializer.Deserialize(serialMetadata);
            Assert.Equal(testMetadata, deserializedMetadata);
        }
    }
}